<?php

namespace app\core;
use App;

class DB extends \PDO
{
    public function __construct($conf)
    {
        $dsn = $conf['dsn'] ;
        $username = $conf['username'] ;
        $password = $conf['password'] ;
        $options = $conf['options'] ;
        parent::__construct($dsn, $username, $password, $options);
    }

    public function getColumn($sql)
    {
        $statement = App::db('default')->query($sql);
        return $statement->fetchAll(\PDO::FETCH_COLUMN  , 0);
    }
}